﻿<%@ Control Language="c#"  AutoEventWireup="false" Inherits="Web.Control.WWW.Answers.Question" %>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<%if(MyFirstO) {%>
				<div class="MessagePanel4 margin20">
					<img id="MessageImg" src="/images/ico_info.gif" style="border-width: 0px;">
					<div id="MessageText"><%=GetText("AS146")%>.</div>
				</div>
				<%} %>
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1><%=Lx.Web.Common.UI.Globals.HtmlStrippedText(QDetatil.Question)%></h1>
							</div>
							<div class="question_summary">
										<div class="qu_con_tltle">
											<p><%=Lx.Web.Common.UI.Globals.HtmlStrippedText(QDetatil.Description)%></p>
										</div>
										<div class="qu_con_from">
											<div class="qu_av"><a href="<%=WWWHost%>/<%=QDetatil.MemberNo%>.htm" title="<%=HttpUtility.HtmlAttributeEncode(QDetatil.Nickname)%>"><img src="<%=QDetatil.Avatar==""?"/Images/No_pic.gif":QDetatil.Avatar%>" width="35" height="35" /></a></div>
											<div class="qu_info">
											<strong class="pink12">
												<%if(QDetatil.Status == "0") 
												{%>
													<%=GetText("AS098")%> 
												<%}
												else if (QDetatil.Status == "1")
												{%>
													<%=GetText("AS095")%>
												<%} 
												else if(QDetatil.Status == "2")
												{%>
													<%=GetText("AS096")%>  
												<%} 
												else if(QDetatil.Status == "3")
												{%>
													<%=GetText("AS097")%> 
												<%} %>
												</strong>, <%=GetText("AS150", new string[] { "<a href='" + WWWHost + "/" + QDetatil.MemberNo + ".htm'>" + QDetatil.Nickname + "</a>", QDetatil.PostDate.ToString("HH:mm, dd/MM/yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo) })%>
											<%=QDetatil.Status == "1" ? " - "+GetText("AS149", new string[] {(7-((TimeSpan)(DateTime.Now - QDetatil.PostDate)).Days).ToString() }) : ""%> - <%=GetText("AS148",new string[]{QDetatil.Views.ToString()})%><br />
											<a href="<%=WWWHost%>/answers/learn-<%=QDetatil.LanguageLearn %>-all/1-1.htm"><%=GetText("C0105",new string[]{BLF.StaticData.GetLanguageText(QDetatil.LanguageLearn)})%></a>
											<%=QDetatil.BaseLanguage == "" ? "" : ", <a href='/answers/learn-all-" + QDetatil.BaseLanguage + "/1-1.htm'>" + GetText("C2019", new string[] { BLF.StaticData.GetLanguageText(QDetatil.BaseLanguage) }) + "</a>"%> &nbsp;&nbsp;&nbsp;&nbsp;
											<%=TagList.Count>0 ? GetText("C0107")+": ":""%> <%foreach(string qtag in TagList) {%><a href="<%=WWWHost%>/answers/tag/<%=qtag%>/learn-<%=QDetatil.LanguageLearn%>-all-1-1.htm"><%=qtag %></a> <%} %>
											</div>
											<div class="clear"></div>
										</div>
										<div class="qu_select">
											<div class="floatl">
											<%if(Memberno!=QDetatil.MemberNo&&QDetatil.Status=="1"){%>
												<input id="ansButton" type="button" class="button" value="<%=GetText("AS151")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"AnswerQuestion()\"":"onclick=\"NotAffirm()\""%>/>
											<%} %>
											</div>
											<div class="floatr" style="margin-left:10px">
											<script type="text/javascript">
											addthis_url = window.location.href;  
											addthis_title = "<%=Escape(QDetatil.Question)%>"; 
											addthis_pub = "italki.com";							
											</script>
											<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
											</div>
											<div class="floatr">
											<img src="/Images/icon_common_share.gif" alt="" align="absmiddle" /> <a href="#" title="<%=GetText("SR016")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$ShareRes$()\"":"onclick=\"NotAffirm()\""%>><%=GetText("C3008")%></a>&nbsp;&nbsp;<img src="/Images/icon_report.gif" alt="" align="absmiddle" /> <a href="#" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><%=GetText("C0110")%></a></div>
											<div class="clear"></div>
										</div>
							</div>
							<div class="submenuN_button"><a href="/answers/ask.htm" class="Naddbtn btnspec"><span>&nbsp;&nbsp;&nbsp;<%=GetText("AS002")%>&nbsp;&nbsp;&nbsp;</span></a></div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Right">
						<div class="center9001content">
						<div class="answers_area">
							<div class="qu_answerarea">
								<div class="floatl"><h3><%=GetText("AS006")%> <span class="grey12">(<%=QDetatil.AnswerCount %>)</span></h3></div>
								<div class="floatr">
									<%if(AnswerCount!=0) {%>
									<div class="grey11"><%=GetText("C2017")%> <select id="selOrder" onchange="TopLocat()" class="grey11"><option value="1" <%=OrdType==1?"selected=\"selected\"":"" %>><%=GetText("AS156")%></option><option value="2" <%=OrdType==2?"selected=\"selected\"":"" %>><%=GetText("AS157")%></option><option value="3" <%=OrdType==3?"selected=\"selected\"":"" %>><%=GetText("AS158")%></option></select></div>
									<%} %>
								</div>
								<div class="clear"></div>
							</div>
							<div class="margin20D">
								<%if(QDetatil.Status=="2"&&Memberno==QDetatil.MemberNo) {%>
								<img src="/Images/icon_ask_0.gif" align="absmiddle" /> <%=GetText("AS152")%>
								<%} else if(QDetatil.Status=="2"&&Memberno!=QDetatil.MemberNo)
								{%>
								<img src="/Images/icon_ask_3.gif" align="absmiddle" /> <%=GetText("AS153")%>
								<%} %>
							</div>
							<%if(BestAnswer.AnswerID!=0) {%>
							<div class="content628 margin20D">
									<div class="qu_bestanswer">
										<div class="asked_pic"><div class="pic75"><a class="photo_75" href="/<%=BestAnswer.MemberNo%>.htm" title="<%=BestAnswer.Nickname%>"><img src="<%=BestAnswer.Avatar==""?"/Images/No_pic.gif":BestAnswer.Avatar%>" alt="" /></a></div></div>
										<div class="asked_con">
											<span class="pink12">
											<%if (BestAnswer.Status == "2")
											{%>
												<strong><%=GetText("AS154")%></strong>
											<%} else{%>
												<strong><%=GetText("AS155")%></strong>
											<%} %>
											</span>
											<div class="best_answer"><%=Lx.Web.Common.UI.Globals.HtmlStrippedText(BestAnswer.Answer)%></div>
											<div class="margin5">
												<div class="floatl grey12"><a href="/<%=BestAnswer.MemberNo%>.htm"><%=BestAnswer.Nickname%></a> <%=FormatDiffDate(GetText("MH052"),BestAnswer.DiffLastUpdate)%></div>
												<div class="qu_answer_flag"><img src="/Images/icon_report.gif" alt="" align="absmiddle" /> <a href="#" title="<%=GetText("C0110")%>" onclick="$Feedback$()"><%=GetText("C0110")%></a></div>
												<div class="qu_answer_vote">
													<div class="ans_rate"><%=BestAnswer.Points%></div>
												</div>
												<div class="clear"></div>
											</div>
										</div>
										<div class="clear"></div>
									</div>
							</div>
							<%} %>
							<div>
							<%if(QDetatil.AnswerCount==0) {%>
								<%=GetText("AS097")%>
								<%if(QDetatil.Status == "1") {%>							
								<div class="margin10 qu_answer_select"><h4><%=GetText("AS160")%></h4><img src="/Images/icon_common_share.gif" alt="" align="absmiddle" /> <a href="#" title="<%=GetText("SR016")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$ShareRes$()\"":"onclick=\"NotAffirm()\""%>><%=GetText("C3008")%></a> <%=GetText("AS159")%></div>							
								<%}} 
								else if(AnswerCount!=0)
								{%>
							<%} %>
							</div>
							<%if(QDetatil.AnswerCount!=0) {%>
							<div>
								<asp:Repeater ID="rptAnswer" runat="server">
									<ItemTemplate>
									<div class="qu_answer_list">
										<div class="qu_answer_list_av"><div class="pic50"><a class="photo_50" href="<%#WWWHost%>/<%#Eval("MemberNo") %>.htm" title="<%#Escape(Eval("Nickname").ToString()) %>"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div></div>
										<div class="qu_answer_list_con">
											<div class="qu_answer_list_text"><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("Answer").ToString())%></div>
											<div class="margin10">
												<div class="floatl grey12"><a href="<%#WWWHost%>/<%#Eval("MemberNo") %>.htm"><%#Escape(Eval("Nickname").ToString()) %></a> <%#FormatDiffDate(GetText("MH052"), Eval("DiffLastUpdate").ToString())%></div>
												<div class="qu_answer_flag"><img src="/Images/icon_report.gif" alt="" align="absmiddle" /> <a href="#" title="<%=GetText("C0110")%>" onclick="$Feedback$()"><%=GetText("C0110")%></a></div>
												<div class="qu_answer_vote">													
													<div class="ans_rate" id="Point<%#Eval("AnswerID")%>"><%#Eval("Points").ToString()%></div>
													<%if((QDetatil.Status == "2" && ((TimeSpan)(DateTime.Now - QDetatil.PostDate)).Days < 13) || QDetatil.Status == "1") {%>									 
													<div class="floatr" id="sub<%#Eval("AnswerID")%>" <%#(int)Eval("MarkType")==1?"style=\"display:none\"":"" %>><a href='javascript:if(CheckLogin())void(0);'><img src="/Images/comment_thumbs_down_neutral.png" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"AnswerMark(false,"+Eval("AnswerID")+")\"":"onclick=\"NotAffirm()\""%>  alt="" /></a></div>
													<div class="floatl" id="add<%#Eval("AnswerID")%>" <%#(int)Eval("MarkType")==2?"style=\"display:none\"":"" %>><a href='javascript:if(CheckLogin())void(0);'><img src="/Images/comment_thumbs_up_neutral.png" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"AnswerMark(true,"+Eval("AnswerID")+")\"":"onclick=\"NotAffirm()\""%> alt="" /></a></div> 
													<div class="floatr" id="1sub<%#Eval("AnswerID")%>" <%#(int)Eval("MarkType")==1?"":"style=\"display:none\"" %>><img src="/Images/comment_thumbs_down_ne1.png" alt="" /></div>
													<div class="floatl" id="1add<%#Eval("AnswerID")%>" <%#(int)Eval("MarkType")==2?"":"style=\"display:none\"" %>><img src="/Images/comment_thumbs_up_neutral1.png" alt="" /></div>  
													<%} %>
													<div class="clear"></div>													
												</div>
												<div class="qu_answer_best">
												<%if ((QDetatil.Status == "2" || QDetatil.Status == "1") && Memberno == QDetatil.MemberNo)
												{%>
												<img src="/Images/icon_accept.gif" align="absmiddle" /> <a href="?BAId=<%#Eval("AnswerID")%>" onclick="showProgressBar(true,true);"><%=GetText("AS013")%></a>
												<%} %>
												</div>
												<div class="clear"></div>
											</div>
										</div>
										<div class="clear"></div>
									</div>
									</ItemTemplate>
								</asp:Repeater>
								<div id="divPage" class="page_num">
									<%=CreatePageNav(AnswerCount, 15, PageIndex,
										"",
										string.Format("<span class='page_none grey10'><a href='{3}/answers/question/{0}-$I$-{1}-2.htm'>{2}</a></span>&nbsp;", HttpUtility.UrlEncode(qid.ToString()), HttpUtility.UrlEncode(OrdType.ToString()), HttpUtility.UrlEncode(GetText("Prev")),WWWHost),
										"",
										string.Format("<span class='page_none grey10'><a href='{3}/answers/question/{0}-$I$-{1}-2.htm'>{2}</a></span>&nbsp;", HttpUtility.UrlEncode(qid.ToString()), HttpUtility.UrlEncode(OrdType.ToString()), HttpUtility.UrlEncode(GetText("Next")),WWWHost),
										string.Format("<span class='page_select'>{0}</span>&nbsp;",PageIndex),
										string.Format("<span class='page_none grey10'><a href='{2}/answers/question/{0}-$I$-{1}-2.htm'>$I$</a></span>&nbsp;", HttpUtility.UrlEncode(qid.ToString()), HttpUtility.UrlEncode(OrdType.ToString()),WWWHost))%>									
								</div>
							</div>
							<%}
							if ((QDetatil.Status == "3" || QDetatil.Status == "0")&&ResolveQCount>0)
							{%>
							<div class="margin20 qu_related">
								<h4><%=GetText("AS099",new string[]{GetText("C0105",new string[]{BLF.StaticData.GetLanguageText(QDetatil.LanguageLearn)})})%></h4>
								<div>
									<ul class="common_right">
									<asp:Repeater ID="rptExpired" runat="server">
										<ItemTemplate>
											<li><a href="<%#WWWHost%>/answers/question/<%#Eval("QuestionID")%>.htm"><%#HttpUtility.HtmlAttributeEncode(Eval("Question").ToString())%></a></li>
										</ItemTemplate>
									</asp:Repeater>
									</ul>
								</div>
							</div>
							<%} %>							
							<div style="text-align:center">
							<script type="text/javascript"><!--
							google_ad_client = "pub-2873751441352197";
							google_ad_width = 468;
							google_ad_height = 60;
							google_ad_format = "468x60_as";
							google_ad_type = "text";
							google_ad_channel = "";
							google_color_border = "ffffff";
							google_color_bg = "ffffff";
							google_color_link = "336699";
							google_color_text = "333333";
							google_color_url = "333333";
							//-->
							</script>
							<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
							</div>
							<div id="answerQ" style="display:none; text-align:left" class="margin20">
								<h4><%=GetText("AS161", new string[] { Lx.Web.Common.UI.Globals.HtmlStrippedText(QDetatil.Question) })%></h4>
								<p><textarea id="aTextarea" class="common600" rows="5" cols=""></textarea><br /><div id="errorAnswer" class="red10" style="display:none"><%=GetText("ST155",new string[]{"2","2000"})%></div></p>								
								<p><input id="subButton" type="button" class="button" value="<%=GetText("AS162")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"AddAnswer()\"":"onclick=\"NotAffirm()\""%>/></p>
							</div>							
						</div>
						</div>
					</div>
					<div class="Center9001Left">
						<%if (QRelated.Count>0) {%>
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("AS060")%></h4>
								<div class="layer_contentA5">
									<ul class="tag_common_right">
									<%foreach(string qtag in TagList) {%><li><a style="background-color:#f3f8fe" href="<%=WWWHost%>/answers/tag/<%=qtag%>-1.htm"><%=qtag %></a></li><%} %>
									</ul>
									<div class="clear"></div>
								</div>								
								<div class="margin10 qu_related_window">
									<div>
										<ul class="qu_related_rightline">
									<asp:Repeater ID="rptRelated" runat="server">
										<ItemTemplate>
										   <li><a href="<%#WWWHost%>/answers/question/<%#Eval("QuestionID")%>.htm" title="<%#HttpUtility.HtmlAttributeEncode(Eval("Question").ToString()) %>"><img src="<%#QStatusImage(Eval("Status").ToString()) %>" border="0" align="absmiddle" /></a> <a href="<%#WWWHost%>/answers/question/<%#Eval("QuestionID")%>.htm"><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("Question").ToString())%></a> <span class="grey12" dir="ltr">(<%#Eval("AnswerCount")%>)</span></li>
										</ItemTemplate>
									</asp:Repeater>
										</ul>
									</div>
								</div>								
							</div>
						</div>
						<%} %>
						<%if(PopularQCount>0) {%>
						<div class="right_layerA">						
							<div class="layer_contentA">
								<h4><%=GetText("AS117")%></h4>
								<div class="layer_contentA5">
								<asp:Repeater ID="rptPopular" runat="server">
									<ItemTemplate>
									<div class="right_question_list">
										<div class="right_question_listPIC"><div class="picsp"><a class="photo_sp" href="<%#WWWHost%>/<%#Eval("MemberNo") %>.htm" title="<%#HttpUtility.HtmlAttributeEncode(Eval("Nickname").ToString())%>"><%#(Eval("Avatar")==null||Eval("Avatar").ToString() == "" )? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div></div>
										<div class="right_question_listCON"><a href="<%#WWWHost%>/<%#Eval("MemberNo") %>.htm"><%#Eval("Nickname") %></a> <a href="<%#WWWHost%>/answers/question/<%#Eval("QuestionID")%>.htm"><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("Question").ToString())%></a> <span class="grey12" dir="ltr">(<%#Eval("AnswerCount")%>)</span></div>
										<div class="clear"></div>
									</div>
									</ItemTemplate>
								</asp:Repeater>
								<p align="right"><a href="<%=WWWHost%>/answers/1-1.htm"><%=GetText("AS089")%></a></p>
								</div>
							</div>
						</div>
						<%}%>						
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<div id="PointItem" style="font-size:16px;display:none">
	$Points$
</div>
<span id="valTextarea" style="color: Red; display: none;" class="red10"></span>
<script>
var AS163 = '<%=GetText("AS163")%>';
var CurQID=<%=qid %>
var CurPageIndex = <%=PageIndex %>
var Memberno = '<%=Memberno %>';
var WWWHost='<%=WWWHost %>';
</script>
